package com.wangyb.wework.sync;

import com.wangyb.wework.service.IWwEmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.stereotype.Component;

/**
 * @Author: wangyb
 * @Date: 2021/7/5 11:48 上午
 */
@Component
@EnableAsync
public class WwEmployeeServiceSyncLogic {
	@Autowired
	private IWwEmployeeService iWwEmployeeService;
	/**
	 * 同步微信企业通讯录
	 */
	@Async
	public void onSyncWxEmp(Long corpId) {
		iWwEmployeeService.syncWxEmployee(corpId);;
	}

	@Async
	public void syncDepartment(Long corpId) {
		iWwEmployeeService.syncDepartment(corpId);
	}

	@Async
	public void onSyncEmployee(Long corpId) {
		iWwEmployeeService.syncEmployee(corpId);
	}
}
